An UPDATE or DELETE statement in Structured Query Language (“SQL”) in which multiple source rows affect the same target row in a nontemporal table can be optimized by removing duplicate source rows. Optimizing such an operation with a temporal table is a challenge.